<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CryptoAuthLib: atcacert_der.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CryptoAuthLib
   </div>
   <div id="projectbrief">Microchip CryptoAuthentication Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00200_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">atcacert_der.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00200.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifndef ATCACERT_DER_H</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#define ATCACERT_DER_H</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00176.html">atcacert.h</a>&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="comment">// Inform function naming when compiling in C++</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#gaafc9ef8e0164226481b670fde0223e13">atcacert_der_enc_length</a>(uint32_t length, uint8_t* der_length, <span class="keywordtype">size_t</span>* der_length_size);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#gaeee4091e249b8fc202d5126a8374eeb1">atcacert_der_dec_length</a>(<span class="keyword">const</span> uint8_t* der_length, <span class="keywordtype">size_t</span>* der_length_size, uint32_t* length);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#ga165018175f52421ea26fb33ccf335108">atcacert_der_adjust_length</a>(uint8_t* der_length, <span class="keywordtype">size_t</span>* der_length_size, <span class="keywordtype">int</span> delta_length, uint32_t* new_length);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#gaf156257cda87df879f54c07e80bc0e8d">atcacert_der_enc_integer</a>(<span class="keyword">const</span> uint8_t* int_data,</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                             <span class="keywordtype">size_t</span>         int_data_size,</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                             uint8_t        is_unsigned,</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;                             uint8_t*       der_int,</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                             <span class="keywordtype">size_t</span>*        der_int_size);</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#ga3b095e11adc55a61e3cfb2957d0c6c77">atcacert_der_dec_integer</a>(<span class="keyword">const</span> uint8_t* der_int,</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                             <span class="keywordtype">size_t</span>*        der_int_size,</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                             uint8_t*       int_data,</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                             <span class="keywordtype">size_t</span>*        int_data_size);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#ga3583ada6da51d31cfe819894e8a9deeb">atcacert_der_enc_ecdsa_sig_value</a>(<span class="keyword">const</span> uint8_t raw_sig[64],</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                                     uint8_t*      der_sig,</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;                                     <span class="keywordtype">size_t</span>*       der_sig_size);</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="keywordtype">int</span> <a class="code" href="a00990.html#gac3f22b75f15e8508f35d99b95d955842">atcacert_der_dec_ecdsa_sig_value</a>(<span class="keyword">const</span> uint8_t * der_sig,</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;                                     <span class="keywordtype">size_t</span> *        der_sig_size,</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;                                     uint8_t         raw_sig[64]);</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;}</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="a00990_html_ga165018175f52421ea26fb33ccf335108"><div class="ttname"><a href="a00990.html#ga165018175f52421ea26fb33ccf335108">atcacert_der_adjust_length</a></div><div class="ttdeci">int atcacert_der_adjust_length(uint8_t *der_length, size_t *der_length_size, int delta_length, uint32_t *new_length)</div><div class="ttdef"><b>Definition:</b> atcacert_der.c:141</div></div>
<div class="ttc" id="a00176_html"><div class="ttname"><a href="a00176.html">atcacert.h</a></div><div class="ttdoc">Declarations common to all atcacert code.</div></div>
<div class="ttc" id="a00990_html_gac3f22b75f15e8508f35d99b95d955842"><div class="ttname"><a href="a00990.html#gac3f22b75f15e8508f35d99b95d955842">atcacert_der_dec_ecdsa_sig_value</a></div><div class="ttdeci">int atcacert_der_dec_ecdsa_sig_value(const uint8_t *der_sig, size_t *der_sig_size, uint8_t raw_sig[64])</div><div class="ttdoc">Parses an ECDSA P256 signature in the DER encoding as found in X.509 certificates.</div><div class="ttdef"><b>Definition:</b> atcacert_der.c:381</div></div>
<div class="ttc" id="a00990_html_gaf156257cda87df879f54c07e80bc0e8d"><div class="ttname"><a href="a00990.html#gaf156257cda87df879f54c07e80bc0e8d">atcacert_der_enc_integer</a></div><div class="ttdeci">int atcacert_der_enc_integer(const uint8_t *int_data, size_t int_data_size, uint8_t is_unsigned, uint8_t *der_int, size_t *der_int_size)</div><div class="ttdoc">Encode an ASN.1 integer in DER format, including tag and length fields.</div><div class="ttdef"><b>Definition:</b> atcacert_der.c:183</div></div>
<div class="ttc" id="a00990_html_ga3b095e11adc55a61e3cfb2957d0c6c77"><div class="ttname"><a href="a00990.html#ga3b095e11adc55a61e3cfb2957d0c6c77">atcacert_der_dec_integer</a></div><div class="ttdeci">int atcacert_der_dec_integer(const uint8_t *der_int, size_t *der_int_size, uint8_t *int_data, size_t *int_data_size)</div><div class="ttdoc">Decode an ASN.1 DER encoded integer.</div><div class="ttdef"><b>Definition:</b> atcacert_der.c:250</div></div>
<div class="ttc" id="a00990_html_gaafc9ef8e0164226481b670fde0223e13"><div class="ttname"><a href="a00990.html#gaafc9ef8e0164226481b670fde0223e13">atcacert_der_enc_length</a></div><div class="ttdeci">int atcacert_der_enc_length(uint32_t length, uint8_t *der_length, size_t *der_length_size)</div><div class="ttdoc">Encode a length in DER format.</div><div class="ttdef"><b>Definition:</b> atcacert_der.c:32</div></div>
<div class="ttc" id="a00990_html_ga3583ada6da51d31cfe819894e8a9deeb"><div class="ttname"><a href="a00990.html#ga3583ada6da51d31cfe819894e8a9deeb">atcacert_der_enc_ecdsa_sig_value</a></div><div class="ttdeci">int atcacert_der_enc_ecdsa_sig_value(const uint8_t raw_sig[64], uint8_t *der_sig, size_t *der_sig_size)</div><div class="ttdoc">Formats a raw ECDSA P256 signature in the DER encoding found in X.509 certificates.</div><div class="ttdef"><b>Definition:</b> atcacert_der.c:311</div></div>
<div class="ttc" id="a00990_html_gaeee4091e249b8fc202d5126a8374eeb1"><div class="ttname"><a href="a00990.html#gaeee4091e249b8fc202d5126a8374eeb1">atcacert_der_dec_length</a></div><div class="ttdeci">int atcacert_der_dec_length(const uint8_t *der_length, size_t *der_length_size, uint32_t *length)</div><div class="ttdoc">Decode a DER format length.</div><div class="ttdef"><b>Definition:</b> atcacert_der.c:88</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="dir_26647cdac0a1f8c717d44b4eb3b4ec89.html">atcacert</a></li><li class="navelem"><a class="el" href="a00200.html">atcacert_der.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
